--== READ ME ==--.txt
=============================================================
splitFlats — slice an image into seamless 64x64 Doom flats
=============================================================
USAGE
splitflats <image> --palette <pal> [options]
OPTIONS
-pal, --palette <file> REQUIRED. Doom palette source (see below)
-b, --background <img> Full-canvas background image (size from --sizequery)
-bt, --backgroundTile <img> 64x64 background tile, repeated behind the cut
-a, --align <pos> Source placement when padded (default: center)
topleft top topright left center right bottomleft bottom bottomright
-n, --name <prefix> Sequential tile names: prefix + 001, 002, ...
-d, --directory <name> Output folder name (default: split)
-sq, --sizequery Print the required canvas size and exit
-h, --help Show this help
PALETTE INPUTS (--palette)
• raw PLAYPAL lump or .pal file (first palette)
• JASC .pal text palette
• WAD containing a PLAYPAL lump (errors if absent)
• DoomTools playpal PNG (256 wide; row 0 used)
• SLADE pal0.png (16x16 swatch grid)
NOTES
• Output tiles are indexed PNGs in Doom palette order.
• A background is required unless width and height are both
exact multiples of 64.
• Tile edges are matched in palette space so adjacent flats
show no seam in software renderers.
EXAMPLES
# exact-fit image, just needs a palette
splitflats wall.png --palette doom2.wad
# odd-size image: fill the padding with a background, centred
splitflats logo.png --palette pal0.png --background bg.png --align center
# name the tiles FLOOR001.. into a chosen folder
splitflats art.png --palette playpal.pal --name FLOOR --directory myflats
# tile a 64x64 background behind the cut
splitflats art.png --palette playpal.lmp --backgroundTile grid64.png
# just ask what canvas size you need to build
splitflats art.png --sizequery
----------------------------------------
How to use
----------------------------------------
Place the bat file and the script file
in a dir which has been added to your
path. Then simply run it via the bat
filename from any location on your
computer using the command line.
I've also included a UDBScript that
will place the selected flats in order
to recreate the mosaic floor pattern
from the split flats.
----------------------------------------
Python Dependancies
----------------------------------------
py -m pip install --upgrade pip
py -m pip install Pillow